using System;
using System.Data;
using Framework.Library.Components.Providers;
using FrameWork.Module.Organization;
using FrameWork.Module.Organization.Library.DataAccess;


namespace Framework.Module.Organization.Library.Providers
{
	public abstract class DataAccessProvider
	{
		private static DataAccessProvider objProvider;
		public static DataAccessProvider Instance()
		{
			if (objProvider != null) return objProvider;
			DataAccessProviderConfiguration objConfig = DataAccessProviderConfiguration.GetDataAccessProviderConfiguration();
            Provider provider = new Provider(objConfig.DefaultProvider, "Framework.Module.Organization.Library.Providers." + objConfig.DefaultProvider, ((Provider)objConfig.Providers[objConfig.DefaultProvider]).ConnectionString);
			objProvider = (DataAccessProvider) DataAccessProviderFactory.CreateDataAccess(provider);
			return objProvider;
		}
        public abstract DataTable GetPortalsByLang(string lang);

        public abstract DataTable GetCategory();
        public abstract OrganizationCategoryInfo GetCategory(int categoryId);
        public abstract int AddCategory(OrganizationCategoryInfo category);
        public abstract void DeleteCategory(int categoryId);
        public abstract void UpdateContent(OrganizationCategoryInfo category);        
    }
}
